package devicedbgui;

import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;

/**Displays all test cases available in the selected folder's exe files */
public class TCDlg extends javax.swing.JDialog {

    public TCDlg(java.awt.Frame parent) {
    super(parent, true);
    initComponents();
    setLayout(new BorderLayout(20, 10));
    
    JLabel label=new JLabel("    Select and run available testcases:");
    label.setBorder(new EmptyBorder(20,0,10,0));
    add(label, BorderLayout.NORTH);
    
    JButton b=new JButton("Finish");
        b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               dispose();
            }
    });
    
    JPanel buttonPane= new JPanel();
    buttonPane.setLayout(new BorderLayout());
    buttonPane.add(b,BorderLayout.EAST);
    buttonPane.setBorder(new EmptyBorder(0,0,10,10));
    add(tbpane, BorderLayout.CENTER);
    add(buttonPane, BorderLayout.SOUTH);
    setSize(600,400) ;
    
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tbpane = new javax.swing.JTabbedPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Select Test Cases");
        setResizable(false);

        tbpane.setPreferredSize(new java.awt.Dimension(600, 200));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tbpane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addComponent(tbpane, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                .addGap(52, 52, 52))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JTabbedPane tbpane;
    // End of variables declaration//GEN-END:variables

}
